package com.test.spring.fusion.controller;
import java.util.UUID;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.alibaba.csp.sentinel.annotation.SentinelResource;

@RestController
public class SentinelResourceController {

	@GetMapping("/hi")
	@SentinelResource(value = "hi")
	public String hi(@RequestParam(value = "name", defaultValue = "forezp", required = false) String name) {
		return "hi " + name;
	}
	
	@GetMapping("test")
	public String test() {
		return UUID.randomUUID().toString();
	}

}